#include "stdio.h"
#include "string.h"
#define lin 48

void chen(char shu[61],char mul[61],int *a,int len)
{
	int i,j,k;

	for (i=0;i<len;i++) mul[i]-=lin;

	for (i=len-1;i>0;i--)
	{
		mul[i]+=shu[i];
		mul[i-1]+=mul[i]/10;
		mul[i]%=10;
		k=i-1;
		while (mul[k]>=10)
		{
			mul[k-1]+=mul[k]/10;
			mul[k]%=10;
			k--;
		}
	}
	mul[0]+=shu[0];
	if (mul[0]>=10)
	{
		*a=100;

	}

	for (i=0;i<len;i++) mul[i]+=lin;
}


int check(char cycle[130],char mul[61],int len)
{
	char c[61];
	int i,b;
	b=1;
	for (i=1;i<len;i++)
	{
		strncpy(c,cycle+i,len);
		c[len]='\0';
		if (strcmp(mul,c)==0)
		{
			b=0;
			break;
		}
	}

	return b;
}
 
void main()
{
	char input[61], shu[61] , mul[61] ,cycle[130];
	int i,b,len;

	
	while (scanf("%s",shu)!=EOF)
	{
		len=strlen(shu);
		strcpy(input,shu);
		strcpy(mul,shu);
		strcpy(cycle,shu);
		strcat(cycle,shu);
		b=0;

		for (i=0;i<len;i++) shu[i]-='0';
		for (i=2;i<=len;i++)
		{
			chen(shu,mul,&i,len);
			if (i==100) b=1;
			if (!b)
			{
			    b=check(cycle,mul,len);
			}
			if (b) break;

		}
		if (b) printf("%s is not cyclic\n",input);
		else printf("%s is cyclic\n",input);
	}

}